﻿using System;
using System.Collections.Generic;
using System.Text;

namespace daSyntaxAnalyser.SyntaxTree
{
    using daBase.Objects;

    public class ConstExpressionElement : ExpressionElement
    {
        private List<TokenInfo> tokens;

        public List<TokenInfo> Tokens { get { return tokens; } set { tokens = value; } }

        public ConstExpressionElement(TokenInfo StartInfo, List<TokenInfo> Tokens, List<TokenInfo> Comments)
            : base(StartInfo, Comments)
        {
            tokens = Tokens;
        }

        public ConstExpressionElement(TokenInfo StartInfo, TokenInfo Token, List<TokenInfo> Comments)
            : base(StartInfo, Comments)
        {
            tokens = new List<TokenInfo>();
            tokens.Add(Token);
        }

        public override string ToString()
        {
            return tokens.Join();
        }
    }
}
